package me.dqn.aspect;

import me.dqn.proccesor.ProcessJoinPoint;

import java.lang.reflect.Method;

/**
 * @author dqn
 * 2018/5/12--0:44
 * every me.dqn.aspect will extend this class,and override do methods
 */
public abstract class ProxyAspect {
    /**
     * before pointcut
     */
    public static final String BEFORE = "before";
    /**
     * after point cut
     */
    public static final String AFTER = "after";

    /**
     * around this pointcut
     */
    public static final String AROUND = "around";

    /**
     * do before target method
     */
    public void doBefore() {

    }

    /**
     * @param args
     */

    public void doBefore(Object[] args) {
        doBefore();
    }

    /**
     * do after target method
     */
    public void doAfter() {

    }

    /**
     * @param args arguements from enhanced methods
     * @return result from proxy method
     */
    public void doAfter(Object[] args) {
        doAfter();
    }

    /**
     * around
     * @param processJoinPoint
     * @return
     */
    public Object doAround(ProcessJoinPoint processJoinPoint){
        return null;
    }
}
